{% extends "../inc/base.html" %}
{% block content %}
<!-- -->
<section class="page-header page-header-xs">
    <div class="container">

        <!-- SEARCH -->
        <form method="get" action="/search" class="clearfix well well-sm search-big nomargin">
            <div class="input-group">

                <div class="input-group-btn">
                    <button type="button" class="btn btn-default input-lg dropdown-toggle noborder-right" data-toggle="dropdown">
                        {%if http.get('d')==''%} 全部时间{%else%}{%if http.get('d')=='day'%}一天内{%elif http.get('d')=='week'%}一周内{%elif http.get('d')=='month'%}一月内{%elif http.get('d')=='year'%}一年内{%endif%}{%endif%} <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li {%if http.get('d')==''%} class="active" {%endif%}>
                            <a href="/search?q={{http.get('q')}}{%if http.get('m')%}&m={{http.get('m')}}{%endif%}">{%if http.get('d')==''%}<i class="fa fa-check"></i>{%endif%} 全部时间</a>
                        </li>
                        <li class="divider"></li>
                        <li {%if http.get('d')=='day'%} class="active" {%endif%}>

                        <a href="/search?q={{http.get('q')}}{%if http.get('m')%}&m={{http.get('m')}}{%endif%}&d=day">  {%if http.get('d')=='day'%}<i class="fa fa-check"></i>{%endif%} 一天内</a>
                        </li>
                        <li {%if http.get('d')=='week'%} class="active" {%endif%}>

                            <a href="/search?q={{http.get('q')}}{%if http.get('m')%}&m={{http.get('m')}}{%endif%}&d=week">{%if http.get('d')=='week'%}<i class="fa fa-check"></i>{%endif%} 一周内</a>
                        </li>
                        <li {%if http.get('d')=='month'%} class="active" {%endif%}>

                            <a href="/search?q={{http.get('q')}}{%if http.get('m')%}&m={{http.get('m')}}{%endif%}&d=month">{%if http.get('d')=='month'%}<i class="fa fa-check"></i>{%endif%} 一月内</a>
                        </li>
                        <li {%if http.get('d')=='year'%} class="active" {%endif%}>

                            <a href="/search?q={{http.get('q')}}{%if http.get('m')%}&m={{http.get('m')}}{%endif%}&d=year">{%if http.get('d')=='year'%}<i class="fa fa-check"></i>{%endif%} 一年内</a>
                        </li>
                    </ul>
                </div>

                <input name="q" class="form-control input-lg" type="text" value="{{http.get('q')}}" placeholder="Search...">
                {%if http.get('d')%}<input name="d" type="hidden" value="{{http.get('d')}}">  {%endif%}
                {%if http.get('m')%}<input name="m" type="hidden" value="{{http.get('m')}}">  {%endif%}
                <div class="input-group-btn">
                    <button type="submit" class="btn btn-default input-lg noborder-left">
                        <i class="fa fa-search fa-lg nopadding"></i>
                    </button>
                </div>
            </div>

        </form>
        <!-- /SEARCH -->
        <h6 class=" text-muted size-11 margin-top-8 margin-bottom-0">
            约获得 {{list.count}} 条结果 <span>(0.01 seconds)</span>
        </h6>

        <ul class="page-header-tabs list-inline">

            <li class="filter {%if http.get('m')==''%}active{%endif%}"><a href="/search?q={{http.get('q')}}{%if http.get('d')%}&d={{http.get('d')}}{%endif%}">全部</a></li>

            {%for v in modlist%}
            <li class="filter {%if http.get('m')==v.mod%}active{%endif%}"><a href="/search?q={{http.get('q')}}&m={{v.mod}}{%if http.get('d')%}&d={{http.get('d')}}{%endif%}">{{v.name}}</a></li>
            {%endfor%}
        </ul>

    </div>
</section>
<!-- / -->
<!-- -->
<section>
    <div class="container">

        <div class="row">

            <!-- LEFT -->
            <div class="col-md-2 col-sm-2">
                <h5 class="text-muted margin-bottom-10">搜索历史</h5>
                <ul class="list-unstyled nomargin">
                    {%for q in hs%}
                    <li><a href="/search?q={{q|urlencode}}">{{q}}</a></li>
                    {%endfor%}
                </ul>
            </div>

            <!-- RIGHT -->
            <div class="col-md-10 col-md-10">

                <!-- SEARCH RESULTS -->
                {%for val in list.data%}
                {% set categoryname = val.category_id|get_cate %}
                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="{%if val.m_type ==1%} {{val.name|get_url(val.d_id)}}{%else%}/mod/{{val.m_id|getmode('name')}}/index/detail/id/{{val.d_id}}{%endif%}">{{val.title}}</a></h4>
                    <small class="text-success">{{val.m_id|getmode('title')}} / {{categoryname.name}} / {{val.add_time|moment('YYYY-MM-DD HH:mm')}}</small>
                    <p>{{val.description|truncate(120, true, "...")}}</p>
                </div><!-- /item -->
                {%endfor%}
{#
                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="#">Smarty Multipurpose &ndash; fully responsive template</a></h4>
                    <small class="text-danger">Dashboard / About</small>
                    <p>Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Ut enim massa, sodales tempor convallis et, iaculis ac massa.</p>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="page-gallery.html">Gallery &ndash; Search Result</a></h4>
                    <small class="text-muted">Dashboard / Gallery</small>
                    <img src="assets/images/demo/people/300x300/1-min.jpg" alt="" height="60" />
                    <p>June 29, 2015- Uploaded by Melisa Doe</p>
                    <a href="#" class="text-warning fsize12">View Gallery</a>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="shop-page-full-product.html">Shop Product &ndash; Search Result</a></h4>
                    <small class="text-muted">Shop / Shirts</small>
                    <img src="assets/images/demo/shop/products/100x100/p5.jpg" alt="" height="60" />
                    <p><span class="line-through">$67.00</span> <strong class="text-danger">$32.00</strong></p>
                    <a href="#" class="text-success fsize12">View Product</a>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="#">Smarty Multipurpose &ndash; fully responsive template</a></h4>
                    <small class="text-success">www.stepofweb.com/</small>
                    <p>Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Ut enim massa, sodales tempor convallis et, iaculis ac massa.</p>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="#">Smarty Multipurpose &ndash; fully responsive template</a></h4>
                    <small class="text-success">Home / About Us</small>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="#">Smarty Multipurpose &ndash; fully responsive template</a></h4>
                    <small class="text-success">www.stepofweb.com/</small>
                    <p>Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Ut enim massa, sodales tempor convallis et, iaculis ac massa.</p>
                </div><!-- /item -->

                <div class="clearfix search-result"><!-- item -->
                    <h4 class="margin-bottom-0"><a href="#">Smarty Multipurpose &ndash; fully responsive template</a></h4>
                    <small class="text-success">Home / About Me</small>
                    <p>Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Ut enim massa, sodales tempor convallis et, iaculis ac massa.</p>
                </div><!-- /item -->
                <!-- /SEARCH RESULTS -->


                <div class="clearfix search-result"><!-- item -->
                    <h4><a href="#">Table Search Example</a></h4>

                    <!-- USER LIST -->
                    <table class="table table-striped table-bordered table-hover margin-top30">
                        <thead>
                        <tr>
                            <th class="width-30">Img</th>
                            <th>F.Name</th>
                            <th>L.Name</th>
                            <th>Stars</th>
                            <th>Email / Username</th>
                            <th>City</th>
                            <th>Progress</th>
                            <th>Share</th>
                            <th>Status</th>
                        </tr>
                        </thead>
                        <tbody>

                        <tr>
                            <td><img src="assets/images/male.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-0 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-default" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        <tr>
                            <td><img src="assets/images/female.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-1 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        <tr class="danger">
                            <td><img src="assets/images/male.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-2 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-danger">Disabled</span></td>
                        </tr>

                        <tr>
                            <td><img src="assets/images/female.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-3 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        <tr class="success">
                            <td><img src="assets/images/male.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-4 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-primary">Admin</span></td>
                        </tr>

                        <tr>
                            <td><img src="assets/images/female.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-5 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        <tr class="warning">
                            <td><img src="assets/images/male.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-0 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-warning">Inactive</span></td>
                        </tr>

                        <tr>
                            <td><img src="assets/images/female.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-0 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        <tr class="info">
                            <td><img src="assets/images/male.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-0 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-info">Pending</span></td>
                        </tr>

                        <tr>
                            <td><img src="assets/images/female.png" alt="" width="20"></td>
                            <td>John</td>
                            <td>Doe</td>
                            <td><div class="rating rating-0 size-13 width-100"><!-- rating-0 ... rating-5 --></div></td>
                            <td>john.doe@yourdomain.com</td>
                            <td>New York</td>
                            <td>
                                <div class="progress progress-xxs margin-bottom-0">
                                    <div class="progress-bar progress-bar-default" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%; min-width: 2em;">
                                        <span class="sr-only">60% Complete</span>
                                    </div>
                                </div>
                            </td>
                            <td>
                                <ul class="list-inline nomargin size-12">
                                    <li><a href="#" class="icon-facebook margin-top-6" data-toggle="tooltip" data-placement="top" title="Facebook"></a></li>
                                    <li><a href="#" class="icon-twitter margin-top-6" data-toggle="tooltip" data-placement="top" title="Twitter"></a></li>
                                    <li><a href="#" class="icon-gplus margin-top-6" data-toggle="tooltip" data-placement="top" title="Google Plus"></a></li>
                                    <li><a href="#" class="icon-linkedin margin-top-6" data-toggle="tooltip" data-placement="top" title="Linkedin"></a></li>
                                    <li><a href="#" class="icon-pinterest margin-top-6" data-toggle="tooltip" data-placement="top" title="Pinterest"></a></li>
                                </ul>
                            </td>
                            <td><span class="label label-success">Active</span></td>
                        </tr>

                        </tbody>
                    </table>
                    <!-- /USER LIST -->

                </div>

#}
                <!-- PAGINATION -->
                <div class="text-center margin-top-20">
                    {{pagination | safe}}
                </div>
                <!-- /PAGINATION -->

            </div>

        </div>


    </div>
</section>
<!-- / -->

{% endblock %}